<template>
  <div>
    {{ $attrs }}
    <!-- <img :src="$attrs.src" alt="" /> -->
    <img v-bind="$attrs" alt="" />
    <button @click="btnClick">获取所有的$listeners</button>
    <button @click="$listeners.xxx">事件</button>
    <el-button v-bind="$attrs">按钮</el-button>
  </div>
</template>
<script>
export default {
  // props: {
  //   src: String,
  //   num: String,
  //   type: String
  // },
  methods: {
    btnClick () {
      this.$listeners.xxx2()
      console.log(this.$listeners)
    }
  }
}
</script>
<style scoped>
.box {
  width: 300px;
  height: 300px;
  background-color: #f00;
}
</style>
